package com.example.libraryaccount.model.api


import com.example.lib_net.entity.ResponseEntity
import com.example.libraryaccount.model.entity.AccountEntity
import okhttp3.Response
import retrofit2.http.GET
import retrofit2.http.PUT
import retrofit2.http.Query

/**
 * @author ytx 
 * @createDate 2023/11/10 14:33
 * @description
 *
 * @updateUser ytx
 * @updateDate 2023/11/10 14:33
 * @updateRemark
 *
 * @version 1.0.0
 */
interface AccountApi {
    /**
     * 根据账号id获取账户信息
     */
    @GET("/account/findAccountById")
    suspend fun findAccountById(@Query("id") id:Int): ResponseEntity<AccountEntity>

    /**
     * 根据用户id获取账户信息
     */
    @GET("/account/findAccountByUserId")
    suspend fun findAccountByUserId(@Query("userid") userid:Int): ResponseEntity<AccountEntity>

    /**
     * 修改金币金额
     */
    @PUT("/account/modifyCoinAmount")
    suspend fun modifyCoinAmount(@Query("id") id:Int, @Query("nm") nm:Int):ResponseEntity<Boolean>
}